﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace VS2048
{
    public partial class PaintBox : UserControl
    {
        private Point _mousePosition = Point.Empty;

        public Point MouseLocation
        {
            get { return _mousePosition; }
        }

        public PaintBox()
        {
            InitializeComponent();

            this.SetStyle(
                            ControlStyles.ResizeRedraw |
                            ControlStyles.AllPaintingInWmPaint |
                            ControlStyles.OptimizedDoubleBuffer |
                            ControlStyles.UserPaint |
                            //ControlStyles.Opaque|
                            ControlStyles.SupportsTransparentBackColor, 
                            true);
            
            //this.BackColor = Color.Transparent;
        }

        private void PaintBox_MouseClick(object sender, MouseEventArgs e)
        {
           _mousePosition = e.Location;
        }
    }
}
